package cn.webrx.wxs.mapper;

import cn.webrx.wxs.entity.GoodsBrand;
import cn.webrx.wxs.vo.VoBrand;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface GoodsBrandMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(GoodsBrand record);

    GoodsBrand selectByPrimaryKey(Integer id);

    List<GoodsBrand> selectAll();

    int updateByPrimaryKey(GoodsBrand record);

    List<VoBrand> page(String name);

    @Insert("insert into ws_goods_brand(image,initial,is_show,name,remark,sort) value(#{image},#{initial},#{is_show},#{name},#{remark},#{sort})")
    int save(GoodsBrand brand);

    @Update("update ws_goods_brand set is_show=#{status} where id=#{id}")
    int updateStatus(@Param("id") int id, @Param("status") int status);


    int update(GoodsBrand brand);
}